home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / include / captive / captivemodid.h < prev    next >
C/C++ Source or Header  |  2006-05-01  |  3KB  |  79 lines

  1. /* $Id: captivemodid.h,v 1.7 2005/12/27 09:05:29 lace Exp $
  2.  * Include file for W32 disk modules identifier for acquiration installation utility
  3.  * Copyright (C) 2003 Jan Kratochvil <project-captive@jankratochvil.net>
  4.  * 
  5.  * This program is free software; you can redistribute it and/or modify
  6.  * it under the terms of the GNU General Public License as published by
  7.  * the Free Software Foundation; exactly version 2 of June 1991 is required
  8.  * 
  9.  * This program is distributed in the hope that it will be useful,
  10.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12.  * GNU General Public License for more details.
  13.  * 
  14.  * You should have received a copy of the GNU General Public License
  15.  * along with this program; if not, write to the Free Software
  16.  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  17.  */
  18.  
  19.  
  20. #ifndef _CAPTIVE_CAPTIVEMODID_H
  21. #define _CAPTIVE_CAPTIVEMODID_H 1
  22.  
  23.  
  24. #ifdef HAVE_LIBXML_XMLREADER_H
  25.  
  26. #include <glib/gtypes.h>
  27. #include <glib-object.h>
  28. #include <libgnomevfs/gnome-vfs-file-size.h>
  29. #include <libxml/tree.h>    /* for xmlChar */
  30. #include <glib/ghash.h>
  31.  
  32.  
  33. G_BEGIN_DECLS
  34.  
  35. #define CAPTIVE_CAPTIVEMODID_TYPE_OBJECT            (captive_captivemodid_object_get_type())
  36. #define CAPTIVE_CAPTIVEMODID_OBJECT(object)         (G_TYPE_CHECK_INSTANCE_CAST((object),CAPTIVE_CAPTIVEMODID_TYPE_OBJECT,CaptiveCaptivemodidObject))
  37. #define CAPTIVE_CAPTIVEMODID_OBJECT_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),CAPTIVE_CAPTIVEMODID_TYPE_OBJECT,CaptiveCaptivemodidObjectClass))
  38. #define CAPTIVE_CAPTIVEMODID_IS_OBJECT(object)      (G_TYPE_CHECK_INSTANCE_TYPE((object),CAPTIVE_CAPTIVEMODID_TYPE_OBJECT))
  39. #define CAPTIVE_CAPTIVEMODID_IS_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),CAPTIVE_CAPTIVEMODID_TYPE_OBJECT))
  40. #define CAPTIVE_CAPTIVEMODID_OBJECT_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),CAPTIVE_CAPTIVEMODID_TYPE_OBJECT,CaptiveCaptivemodidObjectClass))
  41. typedef struct _CaptiveCaptivemodidObject      CaptiveCaptivemodidObject;
  42. typedef struct _CaptiveCaptivemodidObjectClass CaptiveCaptivemodidObjectClass;
  43.  
  44.  
  45. GType captive_captivemodid_object_get_type(void);
  46.  
  47.  
  48. struct captive_captivemodid_module {
  49.     const xmlChar *type;
  50.     gint length;
  51.     const xmlChar *md5;
  52.     const xmlChar *id;
  53.     gint priority;
  54.     gint cabinet_used;
  55.     };
  56.  
  57. extern void (*captive_captivemodid_module_best_priority_notify)(const gchar *module_type);
  58.  
  59. CaptiveCaptivemodidObject *captive_captivemodid_load(const gchar *captive_captivemodid_pathname);
  60. CaptiveCaptivemodidObject *captive_captivemodid_load_default(gboolean fatal);
  61. const gchar *captive_captivemodid_get_pathname_loaded(CaptiveCaptivemodidObject *captivemodid);
  62. gboolean captive_captivemodid_module_length_is_valid(CaptiveCaptivemodidObject *captivemodid,GnomeVFSFileSize file_size);
  63. struct captive_captivemodid_module *captive_captivemodid_module_md5_lookup
  64.         (CaptiveCaptivemodidObject *captivemodid,const gchar *file_md5);
  65. gint captive_captivemodid_module_type_best_priority_lookup
  66.         (CaptiveCaptivemodidObject *captivemodid,const xmlChar *module_type);
  67. gboolean captive_captivemodid_module_type_best_priority_found
  68.         (CaptiveCaptivemodidObject *captivemodid,const xmlChar *module_type);
  69. gint captive_captivemodid_cabinet_length_to_used(CaptiveCaptivemodidObject *captivemodid,gint cabinet_length);
  70.  
  71. gchar *captive_calc_md5(gconstpointer base,size_t length);
  72.  
  73. G_END_DECLS
  74.  
  75. #endif /* HAVE_LIBXML_XMLREADER_H */
  76.  
  77.  
  78. #endif /* _CAPTIVE_CAPTIVEMODID_H */
  79.